from ..center.recv import MQRecvMessage


class RecvMQUse(MQRecvMessage):
    def __init__(self, cofig, queuetest):
        super(RecvMQUse, self).__init__(cofig, queuetest)
        self.config = cofig

    def mInit(self):
        self.no_ack = False

    def setqueue(self, queue):
        self.queue = queue

    def callback(self, ch, method, properties, body):
        super().callback(ch, method, properties, body)

    def run(self):
        self.qos()
        self.consume()
        self.start()
